package com.example.trafficsystem.repository;

import com.example.trafficsystem.entity.Student;
import com.example.trafficsystem.entity.UserTb;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

public interface StudentRe extends JpaRepository<Student, Long> , JpaSpecificationExecutor<Student> {
    boolean existsByPhone(String phone);

    boolean existsByEmail(String email);

    Student findByPhone(String phone);

    Student findByTrainingPlanIdAndId(Long trainingPlanId, Long studentId);
}
